Skip to content

Add test compliance audit template (spec+validation -> test code)#52

Merged
Alan-Jowett merged 3 commits intomicrosoft:mainfrom
Alan-Jowett:add-test-compliance-audit
Mar 20, 2026
Merged

Add test compliance audit template (spec+validation -> test code)#52
Alan-Jowett merged 3 commits intomicrosoft:mainfrom
Alan-Jowett:add-test-compliance-audit

Conversation

@Alan-Jowett
Copy link
Member

Closes #38

Adds a new template that audits test code against a validation plan and requirements document for test compliance drift — gaps between what was planned for testing and what the automated tests actually verify. Completes the audit trifecta.

The Audit Trifecta

Template Compares Drift Types
audit-traceability doc ↔ doc ↔ doc D1–D7
audit-code-compliance spec ↔ source code D8–D10
audit-test-compliance spec ↔ test code D11–D13

New Drift Types (D11–D13)

Label Description
D11_UNIMPLEMENTED_TEST_CASE TC-NNN in validation plan has no automated test
D12_UNTESTED_ACCEPTANCE_CRITERION Test exists but doesn't assert all acceptance criteria
D13_ASSERTION_MISMATCH Test assertions don't match the expected behavior from the plan

New Components

Component File
Protocol protocols/reasoning/test-compliance-audit.md — 6-phase methodology
Template templates/audit-test-compliance.md — consumes requirements + validation plan + test code

Reused Components

specification-analyst persona, investigation-report format, anti-hallucination + self-verification + operational-constraints guardrails, specification-drift taxonomy (extended).

Validation

  • tests/validate-manifest.py passes
  • Assembly smoke test confirms D11/D12/D13 taxonomy content in assembled prompt

Add a new template that audits test code against a validation plan
and requirements document for test compliance drift. Detects
unimplemented test cases (D11), missing acceptance criterion assertions
(D12), and assertion mismatches (D13).

New components:
- Protocol: test-compliance-audit — 6-phase methodology (validation
  plan inventory, test code inventory, forward/backward traceability,
  classification, coverage summary)
- Template: audit-test-compliance — consumes requirements + validation
  plan + test code, produces investigation-report

Extended components:
- Taxonomy: specification-drift — D11-D13 labels defined (previously
  reserved). Ranking criteria updated. No more reserved labels.
- Scenarios gallery updated (moved from future to existing)

This completes the audit trifecta:
- audit-traceability: doc <-> doc <-> doc (D1-D7)
- audit-code-compliance: spec <-> code (D8-D10)
- audit-test-compliance: spec <-> test code (D11-D13)

Closes microsoft#38

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 20, 2026 16:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new audit-test-compliance template and supporting taxonomy/protocol content to detect test compliance drift between requirements + validation plan vs automated test code (D11–D13).

Changes:

  • Introduces audit-test-compliance template to audit validation-plan test cases against test code and report drift findings.
  • Adds test-compliance-audit reasoning protocol (6 phases) for inventorying, tracing, and classifying drift.
  • Extends specification-drift taxonomy with concrete D11–D13 labels and updates docs/manifest to register the new components.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
templates/audit-test-compliance.md New template for auditing test code vs validation plan + requirements using D11–D13
taxonomies/specification-drift.md Defines D11–D13 labels and updates drift ranking guidance
protocols/reasoning/test-compliance-audit.md New 6-phase methodology for test compliance audits
manifest.yaml Registers the new protocol and template
docs/scenarios.md Promotes the scenario from “future” to current with richer metadata

…everity

- PARTIALLY IMPLEMENTED now maps to the correct drift type based on
  what's missing (criteria -> D12, assertions -> D13, stub -> D11)
- Incomplete code context is INCONCLUSIVE, not D11 (same pattern as
  code-compliance audit)
- D11 severity no longer references manual-only tests (those are
  excluded from findings by the protocol)
- acceptance criterion -> acceptance criteria (plural)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

- Test stubs (empty body, skip annotation) are now D13 (assertions
  don't match because there are none) with a code location, not D11
  (which implies no test function exists at all)
- Orphaned tests referencing invalid TC-NNN/REQ-IDs are reported as
  observations in the coverage summary, not as D11-D13 findings
  (they don't fit the taxonomy since no valid TC-NNN is involved)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Alan-Jowett Alan-Jowett merged commit dabef32 into microsoft:main Mar 20, 2026
2 checks passed
@Alan-Jowett Alan-Jowett deleted the add-test-compliance-audit branch March 20, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test compliance audit template (spec+validation → test code)

2 participants